#if !defined(AFX_DGRAMCLIENT_H__AE73FD67_8473_4839_8C01_FD6A0EE6A90D__INCLUDED_)
#define AFX_DGRAMCLIENT_H__AE73FD67_8473_4839_8C01_FD6A0EE6A90D__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "ace/Event_Handler.h"
#include "ace/SOCK_Acceptor.h"
#include "ace/Reactor.h"


class CCameraClient_Acceptor :
	public ACE_Event_Handler
{
public:
	CCameraClient_Acceptor(ACE_Reactor *reactor = ACE_Reactor::instance ())
		:ACE_Event_Handler(reactor) {};
	~CCameraClient_Acceptor(void) {};

	virtual int open (u_short serverport);
	virtual int handle_input (ACE_HANDLE = ACE_INVALID_HANDLE);
	virtual int handle_close (ACE_HANDLE = ACE_INVALID_HANDLE, ACE_Reactor_Mask = 0);
	virtual ACE_HANDLE get_handle() const { return this->acceptor_.get_handle(); };

	ACE_SOCK_Acceptor &acceptor() { return this->acceptor_; };
	int close() {	reactor()->remove_handler(this, ACCEPT_MASK);return 0;};
protected:
	ACE_SOCK_Acceptor acceptor_;

};

#endif